import api from '@/api/index'
import { systemServer } from '@/utils/apiConfig'
// 分页查询信息
export const getMenuList = <T>(data?: unknown) => {
  return api.get<T>(systemServer + '/menus', data)
}
// 新增菜单
export const addSubmit = <T>(data?: unknown) => {
  return api.post<T>(systemServer + '/menus', data)
}
// 修改菜单
export const editSubmit = <T>(id: string, data?: unknown) => {
  return api.put<T>(systemServer + '/menus/' + id, data)
}
// 删除菜单
export const delSubmit = <T>(id: string) => {
  return api.delete<T>(systemServer + '/menus/' + id)
}
// 获取菜单详情
export const getMenuDetail = <T>(id: string) => {
  return api.get<T>(systemServer + '/menus/' + id)
}
